#pragma once

#include "CookImp.h"

class Food
{
public:
	virtual ~Food() {}
	virtual void Cook() = 0;
protected:
	Food() {}
private:
};

class Dumpling : public Food
{
public:
	Dumpling(CookImp* imp) : _imp(imp) { cout << "Dumpling is generated." << endl; }
	~Dumpling() { delete _imp; }
	void Cook() { _imp->Cook(); }
protected:
private:
	CookImp* _imp;
};

class Fries : public Food
{
public:
	Fries(CookImp* imp) : _imp(imp) { cout << "Fries is generated." << endl; }
	~Fries() { delete _imp; }
	void Cook() { _imp->Cook(); }
protected:
private:
	CookImp* _imp;
};